package guanli

import (
	"github.com/spf13/viper"
	"log"
)

type Configdata struct {
	Mysql
}
type Mysql struct {
	User     string
	Password string
	Host     string
	Post     int
	Database string
}

var GetConfigdata Configdata

func Init() {
	viper.SetConfigFile("guanli/config.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&GetConfigdata)
	log.Println(GetConfigdata)
}
